package top.sjydzq.one.Controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import top.sjydzq.one.Entity.Comment;
import top.sjydzq.one.Mapper.CommentMapper;

@RestController
public class CommentController {
    @Autowired
    private CommentMapper commentMapper;

    @RequestMapping(value = "/comment", method = RequestMethod.POST)
    boolean handleComment(Comment comment) {
        if (commentMapper.addComment(comment)) {
            return true;
        } else {
            return false;
        }
    }
}
